<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="nav-close"><i class="fa fa-times-circle"></i>
    </div>
    <div class="sidebar-collapse">
        <ul class="nav metismenu" id="side-menu">
            <li class="nav-header">
                <div class="dropdown profile-element">
                    <span><img alt="image" class="img-circle" src="{$myself.head_url|default='__PUBLIC__/static/admin/img/profile_small.jpg'}" width="48" height="48"/></span>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span class="clear">
                            <span class="block m-t-xs"><strong class="font-bold">{:get_config('site_name','管理后台')}</strong></span>
                            <span class="text-muted text-xs block">{$myself.nickname}<b class="caret"></b></span>
                        </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li><a class="J_menuItem" onclick="$('.profile-element a.dropdown-toggle').click();" href="{:url('Ucenter/profile',['uid'=>$myself['id']])}">个人资料</a>
                        </li>
                        <li><a class="J_menuItem" onclick="$('.profile-element a.dropdown-toggle').click();" href="javascript:void(0)">修改头像</a>
                        </li>
                        <li><a class="J_menuItem" onclick="$('.profile-element a.dropdown-toggle').click();" href="{:url('Ucenter/password',['uid'=>$myself['id']])}">修改密码</a>
                        </li>
                        <li class="divider"></li>
                        <li><a onclick="$('.profile-element a.dropdown-toggle').click();" href="{:url('Sign/logout')}">安全退出</a>
                        </li>
                    </ul>
                </div>
                <div class="logo-element">{:get_config('site_name','管理后台')}</div>
            </li>

            {notempty name="menus"}
            {foreach name="menus" item="menu"}
            <!-- 一级菜单 -->
            {empty name="menu._data"}
            <li class="{:menu_select($menu['path'])}" class="leftSubNav">
                <a class="J_menuItem" href="{:url($menu['path'])}">{notempty name="menu.icon"}<i class="fa {$menu.icon}"></i>{/notempty} <span class="nav-label">{$menu.title}</span></a>
            </li>
            {else/}
            <li>
                <a href="#">{notempty name="menu.icon"}<i class="fa {$menu.icon}"></i>{/notempty} <span class="nav-label">{$menu.title} </span>
                    {if $menu.id == 3}
                    <span class="label label-warning pull-right">{:user_count('new')}</span>
                    {else /}
                    <span class="fa arrow"></span>
                    {/if}
                </a>
                <ul class="nav nav-second-level collapse">
                    <!-- 二级菜单 -->
                    {volist name="menu._data" id="secondMenu"}
                    <li>

                        {empty name="secondMenu._data"}
                        <a class="J_menuItem" href="{:url($secondMenu['path'])}">{$secondMenu.title}</a>
                        {else/}
                        <a href="#">{$secondMenu.title}<span class="fa arrow"></span></a>
                        <ul class="nav nav-third-level collapse">
                            <!-- 三级菜单 -->
                            {volist name="$secondMenu._data" id="thirdMenu"}
                            <li>
                                <a class="J_menuItem" href="{:url($thirdMenu['path'])}">{$thirdMenu.title}</a>
                            </li>
                            {/volist}
                        </ul>
                        {/empty}
                    </li>
                    {/volist}
                </ul>
            </li>
            {/empty}
            {/foreach}
            {/notempty}

        </ul>
    </div>
</nav>